#DBG_FLAG=-g

demo: GATetris.o GAChromosome.o GABoard.o demo.cpp 
	g++ GATetris.o GAChromosome.o GABoard.o demo.cpp $(DBG_FLAG) -o demo


GABoard.o : GABoard.cpp GABoard.h
	g++ -c $(DBG_FLAG) GABoard.h GABoard.cpp

GATetris.o: GATetris.h GATetris.cpp
	g++ -c $(DBG_FLAG) GATetris.h GATetris.cpp

GAChromosome.o: GAChromosome.cpp GAChromosome.h
	g++ -c $(DBG_FLAG) GAChromosome.h GAChromosome.cpp

clean:
	rm -f demo
	rm -f *.gch
	rm -f *.o
	rm -f tmp/*
save:
	rm -f backup/*
	cp *.h backup
	cp *.cpp backup
	cp makefile backup
	rm -f backup.tar
	tar -cvf backup.tar backup
	rm -f backup/*
